﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GcmpUiViewInterface.h"

namespace gcmp
{
    class IGraphicsNodeGroup;
    class ITemporaryDimensionContext;
    class ITemporaryDimensionHandler;
}

namespace gcmp
{
    /// \brief 临时尺寸标注功能接口
    FINAL_INTERFACE class GCMP_UI_VIEW_INTERFACE_EXPORT ITemporaryDimensionManager
    {
    public:
        virtual ~ITemporaryDimensionManager();

        /// \brief 获取尺寸标注功能接口对象
        /// \return nullptr-获取失败；非nullptr-获取成功
        static ITemporaryDimensionManager *Get();

    public:

        /// \brief 获取当前临时尺寸标注处理器
        /// \return 当前临时尺寸标注处理器
        virtual ITemporaryDimensionHandler* GetCurrentTemporaryDimensionHandler() const = 0;

        /// \brief 生成临时标注显示的图形表达
        /// \param ITemporaryDimensionContext 生成临时尺寸标注的几何数据
        /// \return 临时标注显示的图形表达
        /// \see ITemporaryDimensionContext
        virtual OwnerPtr<IGraphicsNodeGroup> GenerateTemporaryDimensionGraphics(const ITemporaryDimensionContext* pCtx) = 0;

    protected:
        static ITemporaryDimensionManager *ms_pManager;
    };

}



